<div class="modal-content">
  <div class="modal-header">
    <h4 class="modal-title"><%= title %></h4>
    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  </div>

  <div class="modal-flash">
    <%= render "trestle/flash/flash" %>
  </div>

  <div class="modal-tabs">
    <%= render "tabs", data: { controller: "tab-errors" } %>
  </div>

  <div class="modal-body">
    <%= yield %>

    <% if content_for?(:sidebar) %>
      <div id="tab-sidebar" class="tab-pane" role="tabpanel">
        <%= content_for(:sidebar) %>
      </div>
    <% end %>
  </div>

  <div class="modal-footer">
    <div class="btn-toolbar secondary-toolbar" role="toolbar">
      <%= render_toolbar(toolbar(:secondary)) %>
      <%= deprecated_toolbar(:secondary) %>
    </div>

    <div class="btn-toolbar primary-toolbar" role="toolbar">
      <%= render_toolbar(toolbar(:primary)) %>
      <%= deprecated_toolbar(:primary) %>
    </div>
  </div>
</div>
